During a writing operation in a NAND-type flash memory, electrons are injected into a floating-gate from the substrate through a tunnel insulating film, due to the FN (Fowler Nordheim) tunnel current. The electrons during this process sometimes cause deterioration of the properties of the tunnel insulating film.